<template>
  <Demo :info="arr" word="你好呀!!!!" @hello="getHello">
    <!-- vue3中具名插槽slot更为v-slot, 以下可简写为：#msg -->
    <template v-slot:msg>
      <div>11111111111</div>
    </template>
  </Demo>
</template>

<script>
import Demo from "./components/Dome";
export default {
  name: "App",
  components: {
    Demo,
  },
  setup() {
    let arr = ["张三", 25, "江山代有才人出,我自逍遥我快乐!!!!"];

    function getHello(value) {
      alert(`自定义事件接收到子组件传过来的值为: ${value}`);
    }

    return {
      arr,
      getHello,
    };
  },
};
</script>
